/* 全局样式 */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --nav-height: 60px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.mobile-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    padding-bottom: calc(var(--nav-height) + 15px);
    -webkit-overflow-scrolling: touch;
}

/* 移动端底部导航栏 */
.mobile-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: white;
    height: var(--nav-height);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding: 8px 0;
}

.mobile-nav .nav-item {
    flex: 1;
    text-align: center;
}

.mobile-nav .nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--secondary-color);
    text-decoration: none;
    padding: 5px;
}

.mobile-nav .nav-link.active {
    color: var(--primary-color);
}

.mobile-nav .nav-link i {
    font-size: 20px;
    margin-bottom: 4px;
}

.mobile-nav .nav-link span {
    font-size: 12px;
}

/* 翻译卡片样式 */
.translation-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px;
    margin-bottom: 15px;
}

/* 语言选择器样式 */
.language-selector {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

/* 输入框样式 */
.translation-input {
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 15px;
    min-height: 120px;
    margin-bottom: 15px;
}

/* 按钮样式 */
.action-button {
    border-radius: 20px;
    padding: 8px 20px;
    font-weight: 500;
}

/* 悬浮窗样式 */
.floating-window {
    position: fixed;
    bottom: calc(var(--nav-height) + 20px);
    left: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
    padding: 15px;
    z-index: 1000;
}

/* 蓝牙状态指示器 */
.bluetooth-status {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 14px;
}

.bluetooth-connected {
    background-color: var(--success-color);
    color: white;
}

.bluetooth-disconnected {
    background-color: var(--danger-color);
    color: white;
}

/* 设置页面样式 */
.settings-item {
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .translation-card {
        margin: 10px 0;
    }
    
    .floating-window {
        bottom: calc(var(--nav-height) + 10px);
        left: 10px;
        right: 10px;
    }

    /* 改进表单元素在移动端的触摸体验 */
    input, select, textarea {
        font-size: 16px !important; /* 防止iOS自动缩放 */
    }

    .form-control, .btn {
        min-height: 44px; /* 更好的触摸目标大小 */
    }
}

/* 添加安全区域支持 */
@supports (padding: max(0px)) {
    .mobile-nav {
        padding-bottom: max(8px, env(safe-area-inset-bottom));
        height: calc(var(--nav-height) + env(safe-area-inset-bottom));
    }

    .content-area {
        padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 15px);
    }
} 